exports.formateLeftTime = formateLeftTime
exports.isChineseMobilePhoneNumber = isChineseMobilePhoneNumber
exports.isEmail = isEmail

function formateLeftTime(e, t) {
  var r = 864e5, n = Math.floor(e / r), a = Math.floor(e % r / 36e5), o = Math.floor(e % r % 36e5 / 6e4), i = Math.floor(e % r % 36e5 % 6e4 / 1e3);
  switch (t) {
    case "min":
      return n + "天" + a + "小时" + o + "分";

    default:
      return n + "天" + a + "小时" + o + "分" + i + "秒";
  }
}

function isChineseMobilePhoneNumber(e, t) {
  return void 0 === t && (t = !1), (t ? /^1(?:3[0-9]|4[5-9]|5[0-9]|6[12456]|7[0-8]|8[0-9]|9[0-9])[0-9]{8}$/ : /^1[3-9][0-9]{9}$/).test(e.toString());
}

function isEmail(e) {
  return /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e);
}

